package com.example.arithmeticleetcode.leetcode.dec;


import java.util.HashMap;
import java.util.Map;

/**
 * @program: arithmetic-leetcode
 * @description:
 * @author: FangZhen
 * @create: 2020-12-11 09:31
 **/
public class Demo08 {

    public static void main(String[] args) {

    }

    public static String rankTeams(String[] votes) {
        if (votes.length == 1 || votes[0].length() == 1) return votes[0];
        int len = votes.length;
        Map<Character, Integer> map = new HashMap<>();
        for (int i = 0; i < len; i++) {
            String str = votes[i];
            for (int j = 0, jLen = votes[i].length(); j < jLen; j++) {
                map.put(str.charAt(j), map.getOrDefault(str.charAt(j), 0) + 1);
            }
        }

        return null;
    }
}
